package com.example.demo.pojo.dto;

import jakarta.persistence.Column;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
public class UserDto {
    private Integer userId;
    @NotBlank(message = "用户名不能为空")//去除空格
    private String userName;
    @NotBlank(message = "密码不能为空")
    @Length(min = 6,max = 20,message = "密码长度在6-20位之间")
    private String password;
    @Email(message = "邮箱格式不正确")
    private String email;
}
